package cc.taofoo.Design.Singleton;

import javax.swing.*;

public class MySingletonPanel extends  JInternalFrame{

    private static MySingletonPanel mySingletonPanel;

    private MySingletonPanel() {
        super("MySingletonPanel");
        this.setLocation(20,20);
        this.setSize(200,200);
        this.setVisible(true);
    }

    public static JInternalFrame getInstance() {
        if (mySingletonPanel == null) {
            mySingletonPanel = new MySingletonPanel();

        }
        return mySingletonPanel;
    }
}
